package com.fofia.iotweb.web.dbdomain.models.admin;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 部门表
 * @TableName sys_dept
 */
@NoArgsConstructor
@AllArgsConstructor
@Data
@Table("sys_dept")
public class SysDept implements Serializable {

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table sys_dept
     *
     * @mbg.generated 2021-02-25 15:38:49
     */
    private static final long serialVersionUID = 1L;

    /**
     * 部门id
     *
     * @mbg.generated 2021-02-25 15:38:49
     */
    @Id(value = "id",keyType = KeyType.None)
    private int id;

    /**
     * 父部门id
     *
     * @mbg.generated 2021-02-25 15:38:49
     */
    @Column(value = "parent_id")
    private int parentId;

    /**
     * 部门类型（0公司，1部门）
     *
     * @mbg.generated 2021-02-25 15:38:49
     */
    @Column(value = "dept_type")
    private String deptType;

    /**
     * 祖级列表
     *
     * @mbg.generated 2021-02-25 15:38:49
     */
    @Column(value = "ancestors")
    private String ancestors;

    /**
     * 部门名称
     *
     * @mbg.generated 2021-02-25 15:38:49
     */
    @Column(value = "dept_name")
    private String deptName;

    /**
     * 显示顺序
     *
     * @mbg.generated 2021-02-25 15:38:49
     */
    @Column(value = "order_num")
    private Integer orderNum;

    @Column(value = "leader_id")

    private Long leaderId;
    /**
     * 负责人
     *
     * @mbg.generated 2021-02-25 15:38:49
     */
    @Column(value = "leader")
    private String leader;

    /**
     * 联系电话
     *
     * @mbg.generated 2021-02-25 15:38:49
     */
    @Column(value = "phone")
    private String phone;

    /**
     * 邮箱
     *
     * @mbg.generated 2021-02-25 15:38:49
     */
    @Column(value = "email")
    private String email;

    /**
     * 部门状态（0正常 1停用）
     *
     * @mbg.generated 2021-02-25 15:38:49
     */
    @Column(value = "dept_status")
    private Integer deptStatus;

    /**
     * 删除标志（0代表存在 2代表删除）
     *
     * @mbg.generated 2021-02-25 15:38:49
     */
    @Column(value = "del_flag")
    private Integer delFlag;

    /**
     * 创建者
     *
     * @mbg.generated 2021-02-25 15:38:49
     */
    @Column(value = "create_by")
    private String createBy;

    /**
     * 创建时间
     *
     * @mbg.generated 2021-02-25 15:38:49
     */
    @Column(value = "create_time")
    private Date createTime;

    /**
     * 更新者
     *
     * @mbg.generated 2021-02-25 15:38:49
     */
    @Column(value = "update_by")
    private String updateBy;

    /**
     * 更新时间
     *
     * @mbg.generated 2021-02-25 15:38:49
     */
    @Column(value = "update_time")
    private Date updateTime;

    @Column(value = "remark")
    private String remark;



    @Column(ignore=true)
    private List<SysDept> children;

}